package com.hcb.micro.controller.base;

import com.hcb.micro.dto.*;
import com.hcb.micro.service.*;
import com.hcb.micro.util.Config;
import com.hcb.micro.util.KdCompanyEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class StaticController{

	@Autowired
	IMallService mallService;
	
	@Autowired
	IProductSellerService productSellerService;
	
	@Autowired
	ICategoryService categoryService;
	
	@Autowired
	IProductService productService;
	
	@Autowired
	IProductColorService productColorService;
	
	@Autowired
	IProductProcessingMethodsService productProcessingMethodsService;
	
	@Autowired
	IProductStyleService productStyleService;
	
	@Autowired
	IProductSizeService productSizeService;
	
	@Autowired
	IUnionService unionService;
	
	@Autowired
	IDiscussService discussService;
	
	@RequestMapping(value="legal.html" , method = RequestMethod.GET)
	public String userCn(ModelMap model) {
		model.put("webPath", getWebPath());
		return "legal";
	}
	
	@RequestMapping(value="tologin" , method = RequestMethod.GET)
	public String tologin(ModelMap model) {
		model.put("webPath", getWebPath());
		return "login";
	}
	
	@RequestMapping(value="logout" , method = RequestMethod.GET)
	public String logout(ModelMap model) {
		model.put("webPath", getWebPath());
		return "login";
	}
	
	@RequestMapping(value="toMall" , method = RequestMethod.GET)
	public String toMall(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
    	model.put("type", manager.getType()+"");
    	
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "mall_list";
	}
	
	@RequestMapping(value="toMallEdit/{mallId}" , method = RequestMethod.GET)
	public String toMallEdit(ModelMap model,@PathVariable("mallId")String mallId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("mallId", mallId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "mall_edit";
	}
	
	@RequestMapping(value="toUser" , method = RequestMethod.GET)
	public String toUser(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "user_list";
	}
	
	@RequestMapping(value="toUserEdit/{accountUuid}" , method = RequestMethod.GET)
	public String toUserEdit(ModelMap model,@PathVariable("accountUuid")String accountUuid,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("accountUuid", accountUuid);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "user_edit";
	}
	
	@RequestMapping(value="toFans" , method = RequestMethod.GET)
	public String toFans(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "fans_list";
	}
	
	@RequestMapping(value="toProduct" , method = RequestMethod.GET)
	public String toProduct(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "product_list";
	}
	
	@RequestMapping(value="toProductAddDemo" , method = RequestMethod.GET)
	public String toProductAddDemo(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para3 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para3);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
		
		//供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list4 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list4.add(psmap);
        }
		model.put("productSellerList", list4);
		return "product_add_demo";
	}
	
	@RequestMapping(value="toProductAdd" , method = RequestMethod.GET)
	public String toProductAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para3 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para3);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
		
		//供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list4 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list4.add(psmap);
        }
		model.put("productSellerList", list4);
		return "product_add";
	}
	
	@RequestMapping(value="toProductEdit/{productId}" , method = RequestMethod.GET)
	public String toProductEdit(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para1 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para1);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
        
		return "product_edit";
	}
	
	@RequestMapping(value="toProductFormat/{productId}" , method = RequestMethod.GET)
	public String toProductFormat(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para1 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para1);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
        
		return "product_format";
	}
	
	@RequestMapping(value="toProductFormatAdd/{productId}" , method = RequestMethod.GET)
	public String toProductFormatAdd(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para1 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para1);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
        
		return "product_format_add";
	}
	
	@RequestMapping(value="toProductFormatPriceList/{productId}" , method = RequestMethod.GET)
	public String toProductFormatPriceList(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para1 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para1);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
        
		return "product_format_price_list";
	}
	
	@RequestMapping(value="toProductFormatPriceAdd/{productId}" , method = RequestMethod.GET)
	public String toProductFormatPriceAdd(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        Map<String,Object> para1 = new HashMap<>();
		List<Category> categoryList = categoryService.selectAllByPara(para1);
		List<Map<String,String>> list3 = new ArrayList<>();
		for(Category category:categoryList){
			Map<String,String> map = new HashMap<>();
			
			map.put("id", category.getId()+"");
			map.put("name", category.getName()+"");
			map.put("desc", category.getDesc()==null?"":category.getDesc());
			list3.add(map);
		}
		model.put("categoryList", list3);
        
		Map<String,Object> formatPara = new HashMap<>();
		formatPara.put("productId", productId);
		List<ProductSize> psizeList = productSizeService.selectByPara(formatPara);
		List<ProductColor> pcList = productColorService.selectByPara(formatPara);
		List<ProductStyle> pstyleList = productStyleService.selectByPara(formatPara);
		List<ProductProcessingMethods> ppmList = productProcessingMethodsService.selectByPara(formatPara);
		
		List<Map<String,Object>> psizeListResult = new ArrayList<>();
		List<Map<String,Object>> pcListResult = new ArrayList<>();
		List<Map<String,Object>> pstyleListResult = new ArrayList<>();
		List<Map<String,Object>> ppmListResult = new ArrayList<>();
		if(psizeList.size()>0){
			for(ProductSize psize:psizeList){
				Map<String,Object> formatMap = new HashMap<>();
				formatMap.put("id", psize.getId());
				formatMap.put("name", psize.getNameOfSize());
				psizeListResult.add(formatMap);
			}
		}
		if(pcList.size()>0){
			for(ProductColor pc:pcList){
				Map<String,Object> formatMap = new HashMap<>();
				formatMap.put("id", pc.getId());
				formatMap.put("name", pc.getNameOfColor());
				pcListResult.add(formatMap);
			}
		}
		if(pstyleList.size()>0){
			for(ProductStyle pstyle:pstyleList){
				Map<String,Object> formatMap = new HashMap<>();
				formatMap.put("id", pstyle.getId());
				formatMap.put("name", pstyle.getNameOfStyle());
				pstyleListResult.add(formatMap);
			}
		}
		if(ppmList.size()>0){
			for(ProductProcessingMethods ppm:ppmList){
				Map<String,Object> formatMap = new HashMap<>();
				formatMap.put("id", ppm.getId());
				formatMap.put("name", ppm.getNameOfProcessingMethods());
				ppmListResult.add(formatMap);
			}
		}
		model.put("psizeListResult", psizeListResult);
		model.put("pcListResult", pcListResult);
		model.put("pstyleListResult", pstyleListResult);
		model.put("ppmListResult", ppmListResult);
		
		return "product_format_price_add";
	}
	
	@RequestMapping(value="toCategory" , method = RequestMethod.GET)
	public String toCategory(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_list";
	}
	
	@RequestMapping(value="toCategoryAdd" , method = RequestMethod.GET)
	public String toCategoryAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_add";
	}
	
	@RequestMapping(value="toCategoryEdit/{categoryId}" , method = RequestMethod.GET)
	public String toCategoryEdit(ModelMap model,@PathVariable("categoryId")String categoryId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("categoryId", categoryId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_edit";
	}
	
	@RequestMapping(value="toCategorySecondLevel/{categoryId}" , method = RequestMethod.GET)
	public String toCategorySecondLevel(ModelMap model,@PathVariable("categoryId")String categoryId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("categoryId", categoryId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_second_level_list";
	}
	
	@RequestMapping(value="toCategorySecondLevelAdd/{categoryId}" , method = RequestMethod.GET)
	public String toCategorySecondLevelAdd(ModelMap model,@PathVariable("categoryId")String categoryId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("categoryId", categoryId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_second_level_add";
	}
	
	@RequestMapping(value="toCategorySecondLevelEdit/{categoryId}/{id}" , method = RequestMethod.GET)
	public String toCategorySecondLevelEdit(ModelMap model,@PathVariable("id")String id,
			@PathVariable("categoryId")String categoryId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("categoryId", categoryId);
		model.put("id", id);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "category_second_level_edit";
	}
	
	@RequestMapping(value="toManageCategoryOfProduct/{categoryId}" , method = RequestMethod.GET)
	public String toManageCategoryOfProduct(ModelMap model,@PathVariable("categoryId")String categoryId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("categoryId", categoryId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "categoryOfProduct_edit";
	}
	
	@RequestMapping(value="toSeller" , method = RequestMethod.GET)
	public String toSeller(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "seller_list";
	}
	
	@RequestMapping(value="toSellerAdd" , method = RequestMethod.GET)
	public String toSellerAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
		return "seller_add";
	}
	
	@RequestMapping(value="toSellerEdit/{productSellerId}" , method = RequestMethod.GET)
	public String toSellerEdit(ModelMap model,@PathVariable("productSellerId")String productSellerId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productSellerId", productSellerId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "seller_edit";
	}
	
	@RequestMapping(value="toCashRed" , method = RequestMethod.GET)
	public String toCashRed(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "cashRed_list";
	}
	
	@RequestMapping(value="toCashRedAdd" , method = RequestMethod.GET)
	public String toCashRedAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
		
		List<Map<String,Object>> typeList = new ArrayList<>();
		Map<String,Object> typeMap1 = new HashMap<>();
		typeMap1.put("name", "通用");
		typeMap1.put("value", 1);
		Map<String,Object> typeMap2 = new HashMap<>();
		typeMap2.put("name", "专用");
		typeMap2.put("value", 2);
		Map<String,Object> typeMap3 = new HashMap<>();
		typeMap3.put("name", "注册红包");
		typeMap3.put("value", 3);
		Map<String,Object> typeMap4 = new HashMap<>();
		typeMap4.put("name", "节日红包");
		typeMap4.put("value", 4);
		
		typeList.add(typeMap1);
		typeList.add(typeMap2);
		typeList.add(typeMap3);
		typeList.add(typeMap4);
		model.put("typeList", typeList);
        
		return "cashRed_add";
	}
	
	@RequestMapping(value="toCashRedEdit/{cashRedId}" , method = RequestMethod.GET)
	public String toCashRedEdit(ModelMap model,@PathVariable("cashRedId")String cashRedId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("cashRedId", cashRedId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
		return "cashRed_edit";
	}
	
	@RequestMapping(value="toMallProduct/{mallUuid}" , method = RequestMethod.GET)
	public String toProductMall(ModelMap model,@PathVariable("mallUuid")String mallUuid,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        model.put("mallUuid", mallUuid);
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "productMall_list";
	}
	
	@RequestMapping(value="toOrder/{mallUuid}" , method = RequestMethod.GET)
	public String toOrder(ModelMap model,@PathVariable("mallUuid")String mallUuid,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("mallUuid", mall.getMallUuid());
        model.put("enabled", manager.getEnabled());
        
        //搜索条件
        model.put("searchMallUuid", mallUuid);
        
     	//商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //物流公司列表
        List<Map<String,Object>> list = new ArrayList<>();
        for (KdCompanyEnum e : KdCompanyEnum.values())
        {	Map<String,Object> map = new HashMap<>();
        	map.put("code", e.getKdnCode());
        	map.put("name", e.getCompanyName());
        	list.add(map);
        }
        model.put("logistics", list);
        
		return "order_list";
	}
	
	@RequestMapping(value="toOrder2" , method = RequestMethod.GET)
	public String toOrder2(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //物流公司列表
        List<Map<String,Object>> list = new ArrayList<>();
        for (KdCompanyEnum e : KdCompanyEnum.values())
        {	Map<String,Object> map = new HashMap<>();
        	map.put("code", e.getKdnCode());
        	map.put("name", e.getCompanyName());
        	list.add(map);
        }
        model.put("logistics", list);
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "order_list2";
	}
	
	@RequestMapping(value="toOrderDetail/{orderId}" , method = RequestMethod.GET)
	public String toOrderDetail(ModelMap model,@PathVariable("orderId")String orderId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("orderId", orderId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "order_detail";
	}
	
	@RequestMapping(value="toMoney" , method = RequestMethod.GET)
	public String toMoney(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "money_list";
	}
	
	@RequestMapping(value="toMoneyDetail/{withdrawalsUuid}" , method = RequestMethod.GET)
	public String toMoneyDetail(ModelMap model,@PathVariable("withdrawalsUuid")String withdrawalsUuid,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("withdrawalsUuid", withdrawalsUuid);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "money_detail";
	}
	
	@RequestMapping(value="toManager" , method = RequestMethod.GET)
	public String toManager(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "manager_list";
	}
	
	@RequestMapping(value="toManagerEdit/{managerId}" , method = RequestMethod.GET)
	public String toManagerEdit(ModelMap model,@PathVariable("managerId")String managerId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("managerId", managerId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "manager_edit";
	}
	
	@RequestMapping(value="toManagerAdd" , method = RequestMethod.GET)
	public String toManagerAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallListAll = mallService.selectByPara(para);
		List<Map<String,String>> list = new ArrayList<>();
		for(Mall m:mallListAll){
			Map<String,String> map = new HashMap<>();
			map.put("mallUuid", m.getMallUuid());
			map.put("mallName", m.getMallName());
			list.add(map);
		}
		model.put("mallList", list);
		
		return "manager_add";
	}
	
	
	@RequestMapping(value="toMallBanner" , method = RequestMethod.GET)
	public String toMallBanner(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "mall_banner_list";
	}
	
	@RequestMapping(value="toMallBannerAdd" , method = RequestMethod.GET)
	public String toMallBannerAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		
		//供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
		
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "mall_banner_add";
	}
	
	@RequestMapping(value="toMallBannerEdit/{bannerId}" , method = RequestMethod.GET)
	public String toMallBannerEdit(ModelMap model,@PathVariable("bannerId")String bannerId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("bannerId", bannerId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "mall_banner_edit";
	}
	
	@RequestMapping(value="toBannerProduct/{bannerId}" , method = RequestMethod.GET)
	public String toBannerProduct(ModelMap model,@PathVariable("bannerId")String bannerId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("bannerId", bannerId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "bannerOfProduct_list";
	}
	
	@RequestMapping(value="toHostProduct" , method = RequestMethod.GET)
	public String toHostProduct(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "hostOfProduct_list";
	}
	
	@RequestMapping(value="toOrderProductRefund" , method = RequestMethod.GET)
	public String toOrderProductRefund(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "order_product_refund_list";
	}
	
	
	@RequestMapping(value="toBuyBack" , method = RequestMethod.GET)
	public String toBuyBack(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "buyBack_list";
	}
	
	@RequestMapping(value="toProductLog" , method = RequestMethod.GET)
	public String toProductLog(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //添加商品列表信息
        List<Product> productList=productService.selectByPara(null);
        model.put("productList", productList);
        
		return "productPriceLog_list";
	}
	
	
	@RequestMapping(value="toOtherPrice" , method = RequestMethod.GET)
	public String toOtherPrice(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //添加商品列表信息
        List<Product> productList=productService.selectByPara(null);
        model.put("productList", productList);
        
		return "other_price_list";
	}
	
	@RequestMapping(value="toUplevel" , method = RequestMethod.GET)
	public String toUplevel(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
		return "uplevel_list";
	}
	
	@RequestMapping(value="toShopMessage" , method = RequestMethod.GET)
	public String toShopMessage(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
		if(manager == null){
			return "login";
		}
		model.put("type", manager.getType()+"");
		
		Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
		model.put("mallName", mall.getMallName());
		model.put("enabled", manager.getEnabled());
		
		//商城列表
		Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
		List<Map<String,Object>> list2 = new ArrayList<>();
		for (Mall m: mallList)
		{	Map<String,Object> map = new HashMap<>();
		map.put("mallUuid", m.getMallUuid());
		map.put("mallName", m.getMallName());
		list2.add(map);
		}
		model.put("mallList", list2);
		return "shopMessage_list";
	}
	
	@RequestMapping(value="toShopMessageEdit/{accountId}" , method = RequestMethod.GET)
	public String toShopMessageEdit(ModelMap model,@PathVariable("accountId")String accountId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("accountId", accountId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
		return "shopMessage_edit";
	}
	
	@RequestMapping(value="toSellerReward" , method = RequestMethod.GET)
	public String toSellerReward(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "seller_reward_list";
	}
	
	@RequestMapping(value="toSellerOrder/{sellerId}" , method = RequestMethod.GET)
	public String toSellerOrder(ModelMap model,@PathVariable("sellerId")String sellerId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("mallUuid", mall.getMallUuid());
        model.put("enabled", manager.getEnabled());
        
        //搜索条件
        model.put("sellerId", sellerId);
        
     	//商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //物流公司列表
        List<Map<String,Object>> list = new ArrayList<>();
        for (KdCompanyEnum e : KdCompanyEnum.values())
        {	Map<String,Object> map = new HashMap<>();
        	map.put("code", e.getKdnCode());
        	map.put("name", e.getCompanyName());
        	list.add(map);
        }
        model.put("logistics", list);
        
		return "seller_order_list";
	}
	
	@RequestMapping(value="toPartner" , method = RequestMethod.GET)
	public String toPartner(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "partner_list";
	}
	
	@RequestMapping(value="toModifyPartner/{accountId}" , method = RequestMethod.GET)
	public String toModifyPartner(ModelMap model,@PathVariable("accountId")String accountId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
		if(manager == null){
			return "login";
		}
		model.put("type", manager.getType()+"");
		
		//搜索条件
        model.put("accountId", accountId);
		
		Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
		model.put("mallName", mall.getMallName());
		model.put("enabled", manager.getEnabled());
		
		//商城列表
		Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
		List<Map<String,Object>> list2 = new ArrayList<>();
		for (Mall m: mallList)
		{	Map<String,Object> map = new HashMap<>();
		map.put("mallUuid", m.getMallUuid());
		map.put("mallName", m.getMallName());
		list2.add(map);
		}
		model.put("mallList", list2);
		
		return "partner_edit";
	}
	
	@RequestMapping(value="toIncentiveSystem" , method = RequestMethod.GET)
	public String toIncentiveSystem(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "incentiveSystem_list";
	}
	
	@RequestMapping(value="toIncentiveSystemAdd" , method = RequestMethod.GET)
	public String toIncentiveSystemAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
		
		return "incentiveSystem_add";
	}
	
	@RequestMapping(value="toIncentiveSystemEdit/{incentiveSystemId}" , method = RequestMethod.GET)
	public String toIncentiveSystemEdit(ModelMap model,@PathVariable("incentiveSystemId")String incentiveSystemId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("incentiveSystemId", incentiveSystemId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
		return "incentiveSystem_edit";
	}
	
	@RequestMapping(value="toAdvertisement" , method = RequestMethod.GET)
	public String toAdvertisement(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "advertisement_list";
	}
	
	@RequestMapping(value="toAdvertisementAdd" , method = RequestMethod.GET)
	public String toAdvertisementAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "advertisement_add";
	}
	
	@RequestMapping(value="toAdvertisementEdit/{advertisementId}" , method = RequestMethod.GET)
	public String toAdvertisementEdit(ModelMap model,@PathVariable("advertisementId")String advertisementId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("advertisementId", advertisementId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "advertisement_edit";
	}
	
	@RequestMapping(value="toProductSummary/{productId}" , method = RequestMethod.GET)
	public String toProductSummary(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        model.put("productId", productId);
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "productSummary_list";
	}
	
	@RequestMapping(value="toProductSummaryAdd/{productId}" , method = RequestMethod.GET)
	public String toProductSummaryAdd(ModelMap model,@PathVariable("productId")String productId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        model.put("productId", productId);
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "productSummary_add";
	}
	
	@RequestMapping(value="toProductSummaryEdit/{productId}/{productSummaryId}" , method = RequestMethod.GET)
	public String toProductSummaryEdit(ModelMap model,
			@PathVariable("productId")String productId,
			@PathVariable("productSummaryId")String productSummaryId,
			HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("productId", productId);
		model.put("productSummaryId", productSummaryId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "productSummary_edit";
	}
	
	public String getWebPath() {
		return Config.getString("webPath");
	}
	

	@RequestMapping(value="toDiscuss" , method = RequestMethod.GET)
	public String toDiscuss(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
        
        List<Union> unionList= unionService.selectByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (Union union: unionList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", union.getId());
        	psmap.put("productSellerName", union.getUnionName());
        	list3.add(psmap);
        }
		
		
		
		model.put("productSellerList", list3);
        
		return "discuss_list";
	}
	
	@RequestMapping(value="toDiscussAdd" , method = RequestMethod.GET)
	public String toDiscussAdd(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
		
		return "discuss_add";
	}
	
	@RequestMapping(value="toDiscussEdit/{discussId}" , method = RequestMethod.GET)
	public String toDiscussEdit(ModelMap model,@PathVariable("discussId")String discussId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("discussId", discussId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
        //供应商列表
        Map<String,Object> para2 = new HashMap<>();
		List<ProductSeller> productSellerAllList = productSellerService.selectAllByPara(para2);
		List<Map<String,Object>> list3 = new ArrayList<>();
		for (ProductSeller productSeller: productSellerAllList)
        {	
        	Map<String,Object> psmap = new HashMap<>();
        	psmap.put("productSellerId", productSeller.getId());
        	psmap.put("productSellerName", productSeller.getName());
        	list3.add(psmap);
        }
		model.put("productSellerList", list3);
        
		return "discuss_edit";
	}
	@RequestMapping(value="toUnionConsume" , method = RequestMethod.GET)
	public String toUnionConsume(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "union_consume_list";
	}
	@RequestMapping(value="toUnionConsumeEdit/{UnionConsumeId}" , method = RequestMethod.GET)
	public String toUnionConsumeEdit(ModelMap model,@PathVariable("UnionConsumeId")String UnionConsumeId,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		model.put("UnionConsumeId", UnionConsumeId);
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);               
		return "union_consume_edit";
	}
	@RequestMapping(value="toUnion" , method = RequestMethod.GET)
	public String toUnion(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "union_list";
	}
	
	@RequestMapping(value="toAddProduct" , method = RequestMethod.GET)
	public String toAddProduct(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "apply/addProduct";
	}
	
	@RequestMapping(value="toApplyPartner" , method = RequestMethod.GET)
	public String toApplyPartner(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "apply/partner";
	}
	
	
	@RequestMapping(value="toLevel" , method = RequestMethod.GET)
	public String toLevel(ModelMap model,HttpServletRequest req) {
		model.put("webPath", getWebPath());
		HttpSession session = req.getSession();
		Manager manager = (Manager) session.getAttribute("MANAGER");
        if(manager == null){
        	return "login";
        }
        model.put("type", manager.getType()+"");
        
        Mall mall = mallService.selectByMallUuid(manager.getMallUuid());
        model.put("mallName", mall.getMallName());
        model.put("enabled", manager.getEnabled());
        
        //商城列表
        Map<String,Object> para = new HashMap<>();
		if(mall != null && !"商盟惠购".equals(mall.getMallName())){
			para.put("mallUuid", mall.getMallUuid());
		}
		List<Mall> mallList = mallService.selectByPara(para);
        List<Map<String,Object>> list2 = new ArrayList<>();
        for (Mall m: mallList)
        {	Map<String,Object> map = new HashMap<>();
        	map.put("mallUuid", m.getMallUuid());
        	map.put("mallName", m.getMallName());
        	list2.add(map);
        }
        model.put("mallList", list2);
        
		return "apply/level";
	}
	
}
